﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ATM
{
    public partial class userTransactions : Form
    {
        public userTransactions()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void userTransactionsBut_Click(object sender, EventArgs e)
        {
            int id = int.Parse(userId.Text);
            if (userId.Text != "")
            {
                adminLogic al = new adminLogic();
                DataSet ds = al.showUserTransactions(id);
                userTransactionsView.DataSource = ds.Tables[0];
                userTransactionsView.Show();
            }
            else
                MessageBox.Show("user id can not be empty!");
                
        }

        private void userTransactions_Load(object sender, EventArgs e)
        {

        }

        private void exituserTransactions_Click(object sender, EventArgs e)
        {
            adminMainPanel amForm = new adminMainPanel();
            this.Hide();
            amForm.Show();
        }
    }
}
